<?php
/**
 * Pert Library
 * Client Class
 *
 * @author	Emre Hasegeli <hasegeli@gmail.com>
 * @license	GNU General Public License v3
 */

namespace Pert;

class Client
{
	private static $object;

	protected function __construct()
	{
		self::$object = $this;
	}

	public static function Get()
	{
		if(!(self::$object))
			new self();

		return self::$object;
	}

	public function SelectIP()
	{
		return $_SERVER['REMOTE_ADDR'];
	}

	public function SelectLanguage()
	{
		return Language::Select(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'],
				0,
				2));
	}
}
